package com.woniu.es.repo;

import com.woniu.model.HisMedicine;
import org.springframework.data.elasticsearch.annotations.Query;
import org.springframework.data.elasticsearch.repository.ElasticsearchRepository;

import java.util.List;

public interface DrugsRepo extends ElasticsearchRepository<HisMedicine,Integer> {


    @Query("{\n" +
            "    \"query\":{\n" +
            "        \"match\":{\n" +
            "            \"medicinename\": \"?0\"\n" +
            "        }\n" +
            "    }\n" +
            "}")
    List<HisMedicine>  selectPage(String medicinename);

}
